function checkForm(){
	if(tinyMCE.get("content").getContent()!=""){
		//return true;
	} 
	//return false ;
}
$(document).ready(function(){
	function publish(published){
		$(published).click(function(){
			$.ajax({
				url:"?com=resources&action=published",
				type:"POST",
				data:{
					id:$(published).attr("rid"),
					publish:$(published).attr("publish")
				},
				success:function(data){
					data=parseInt(data);
					if ( data == 1 ){
						if ( $(published).hasClass("rsrc_notpublished") ){
							$(published).removeClass("rsrc_notpublished");
							$(published).addClass("rsrc_published");
						}
						else if( $(published).hasClass("rsrc_published") ){
							$(published).removeClass("rsrc_published");
							$(published).addClass("rsrc_notpublished");
						}
					}
				}
			});
		});
	}
	var publishes = $(".publish").toArray();
	for( var i in publishes ){
		publish( published[i] );
	}
});